package com.ken.spring.annotation.service;

import com.ken.spring.annotation.repository.UserRepositoryInterf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    UserRepositoryInterf userRepositoryInterf;

    @Autowired
    public void setUserRepositoryInterf(@Qualifier("userJdbcRepositoryImpl") UserRepositoryInterf userRepositoryInterf) {
        this.userRepositoryInterf = userRepositoryInterf;
    }

    public void add() {
        System.out.println("UserService add...");

        userRepositoryInterf.save();
    }
}
